<?php

namespace App\Modules\Admin\Entities\Mall;

use App\Models\Model;

class GoodsLabelModel extends Model
{

    protected $table='goods_label';
    protected $primaryKey='id';
    protected $is_delete=0;

    public function getGoodsLabelList()
    {
       return $this->where(['is_show'=>1])->orderBy('sort','desc')->get(['id','title','type','image','font_color','border_color','bg_color'])->toArray();
    }
    public function getGoodsLabelListById($ids)
    {
       return $this->whereIn($this->primaryKey,$ids)->orderBy('sort','desc')->get(['id','title','type','image','font_color','border_color','bg_color'])->toArray();
    }
}

